using System;
using System.Collections;

namespace Com.CMS263.PO
{
	#region Discuss

	/// <summary>
	/// Discuss object for NHibernate mapped table 'Discuss'.
	/// </summary>
	public class Discuss
	{
		#region Member Variables
		
		protected int _id;
		protected string _title;
		protected string _worker;
		protected string _workerNames;
		protected string _contents;
		protected string _files;
		protected DateTime _beginDate;
		protected DateTime _endDate;
		protected DateTime _addDate;

		#endregion

		#region Constructors

		public Discuss() { }

		public Discuss( string title, string worker, string workerNames, string contents, string files, DateTime beginDate, DateTime endDate, DateTime addDate )
		{
			this._title = title;
			this._worker = worker;
			this._workerNames = workerNames;
			this._contents = contents;
			this._files = files;
			this._beginDate = beginDate;
			this._endDate = endDate;
			this._addDate = addDate;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public  virtual string Title
		{
			get { return _title; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for Title", value, value.ToString());
				_title = value;
			}
		}

		public  virtual string Worker
		{
			get { return _worker; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for Worker", value, value.ToString());
				_worker = value;
			}
		}

		public  virtual string WorkerNames
		{
			get { return _workerNames; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for WorkerNames", value, value.ToString());
				_workerNames = value;
			}
		}

		public  virtual string Contents
		{
			get { return _contents; }
			set
			{
				if ( value != null && value.Length > 4000)
					throw new ArgumentOutOfRangeException("Invalid value for Contents", value, value.ToString());
				_contents = value;
			}
		}

		public  virtual string Files
		{
			get { return _files; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for Files", value, value.ToString());
				_files = value;
			}
		}

		public  virtual DateTime BeginDate
		{
			get { return _beginDate; }
			set { _beginDate = value; }
		}

		public  virtual DateTime EndDate
		{
			get { return _endDate; }
			set { _endDate = value; }
		}

		public  virtual DateTime AddDate
		{
			get { return _addDate; }
			set { _addDate = value; }
		}

		

		#endregion
	}
	#endregion
}